package com.imedway.ihe.dd.util;

import cn.hutool.core.lang.UUID;

import static com.imedway.ihe.dd.constant.DDConst.UUID_PRE;

/**
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2024/7/31
 */
public class UidUtil {

    public static String id() {
        return UUID.fastUUID().toString();
    }

    /**
     * 生成uid
     *
     * @return uid
     */
    public static String uid() {
        return UUID_PRE + UUID.fastUUID();
    }

    /**
     * 生成uid
     *
     * @param pre 前缀
     * @return uid
     */
    public static String uid(String pre) {
        return pre + UUID.fastUUID();
    }
}
